/*
 * @Author: zhanglianchang
 * @Date: 2020-08-01 14:39:32
 * @Last Modified by: taoshiwei
 * @Last Modified time: 2019-04-29 14:57:26
 *
 * 标签有关的接口：自己写吧~~  已经被张老师删了 ^_^
 */

import { createAPI } from '@/utils/request'

// 标签列表
export const tagList = data => createAPI('/tags', 'get', data)
// 修改标签状态
export const changeState = data =>
  createAPI(`/tags/${data.id}/${data.state}`, 'post', data)
// 删除标签
export const tagDel = data => createAPI(`/tags/${data.id}`, 'DELETE', data)
// 标签添加
export const tagAdd = data => createAPI('/tags', 'post', data)
// 修改标签(按钮)
export const changeTag = data => createAPI(`/tags/${data.id}`, 'PUT', data)

// 标签列表
export const list = data => createAPI('/tags', 'get', data)
